<template>
  <div class="createPay">
    <div>
      <el-button type="primary" size="mini" @click="newlyAdjustment">{{ $t('btn.save') }}</el-button>
    </div>
    <el-tabs v-model="activeName">
      <el-tab-pane :label="$t('market.info')" name="first">
        <el-form :model="subDetails" label-width="100px" size="mini">
          <el-form-item :label="$t('market.billType')">
            <el-select
              v-model="subDetails.fbillTypeId"
              @change="queryProval"
            >
              <el-option
                v-for="item in billtypes"
                :key="item.fid"
                :label="item.fname"
                :value="item.fid"
              />
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('market.orderDate')">
            <el-date-picker
              v-model.trim="subDetails.fdate"
              type="date"
              style="width: 152px"
              value-format="yyyy-MM-dd"
            />
          </el-form-item>
          <el-form-item :label="$t('market.endData')">
            <el-date-picker
              v-model.trim="subDetails.fenddate"
              type="date"
              style="width: 152px"
              value-format="yyyy-MM-dd"
            />
          </el-form-item>
          <el-form-item :label="$t('market.supplier')">
            <el-autocomplete
              v-model="subDetails.fsupplierName"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch9"
              @focus="handleSupplier"
              @select="supplierSelectRow"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="openSupplier = true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.currency2')" prop="fsettlecurrId">
            <el-autocomplete
              v-model="subDetails.fcurrencyName"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch5"
              @focus="queryTBdCurrency"
              @select="currencySelectRow"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="openCurrency = true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.purchaser')" prop="fpurchaserId">
            <el-autocomplete
              v-model="subDetails.fpurchaser"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch3"
              @focus="querySalesperson(2)"
              @select="purchaseData"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="purchaseVisiblit=true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fuserName }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <el-form-item :label="$t('market.recCondition')" prop="fpayconditionId">
            <el-autocomplete
              v-model="subDetails.fpayconditionName"
              highlight-first-item
              popper-class="my-autocomplete"
              :fetch-suggestions="querySearch4"
              @focus="querytReccondition"
              @select="gatheringData"
            >
              <i
                slot="suffix"
                class="el-input__icon el-icon-search"
                @click="gatheringVisiblit=true"
              />
              <template slot-scope="{ item }">
                <div class="name">{{ item.fname }}</div>
              </template>
            </el-autocomplete>
          </el-form-item>
          <!--          <el-form-item label="结算组织">-->
          <!--            <el-select v-model.trim="subDetails.orgSet" @change="saleHeadel">-->
          <!--              <el-option-->
          <!--                v-for="option in teamList"-->
          <!--                :key="option.fid"-->
          <!--                :label="option.fname"-->
          <!--                :value="option.fid"-->
          <!--              />-->
          <!--            </el-select>-->
          <!--          </el-form-item>-->
          <!--          <el-form-item label="收款组织">-->
          <!--            <el-select v-model.trim="subDetails.orgCol">-->
          <!--              <el-option-->
          <!--                v-for="option in teamList"-->
          <!--                :key="option.fid"-->
          <!--                :label="option.fname"-->
          <!--                :value="option.fid"-->
          <!--              />-->
          <!--            </el-select>-->
          <!--          </el-form-item>-->
          <!--          <el-form-item label="采购组织">-->
          <!--            <el-select v-model.trim="subDetails.orgSal">-->
          <!--              <el-option-->
          <!--                v-for="option in teamList"-->
          <!--                :key="option.fid"-->
          <!--                :label="option.fname"-->
          <!--                :value="option.fid"-->
          <!--              />-->
          <!--            </el-select>-->
          <!--          </el-form-item>-->
        </el-form>
      </el-tab-pane>
      <el-tab-pane :label="$t('market.fince')" name="two">
        <el-form :model="subDetails" label-width="100px" size="mini">
          <el-form-item :label="$t('market.exchangeType')">
            <el-input v-model.trim="subDetails.fexchangetype" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.localCurr')">
            <el-input v-model.trim="subDetails.flocalCurr" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.exchangeRate')">
            <el-input v-model.trim="subDetails.fexchangerate" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.notrateamount')">
            <el-input v-model.trim="subDetails.fbillamount" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billtaxamount')">
            <el-input v-model.trim="subDetails.fbilltaxamount" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billallamount')">
            <el-input v-model.trim="subDetails.fbillallamount" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.notrateamount_lc')" label-width="120px">
            <el-input v-model.trim="subDetails.fbillamountLc" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billtaxamount_lc')">
            <el-input v-model.trim="subDetails.fbilltaxamountLc" disabled />
          </el-form-item>
          <el-form-item :label="$t('market.billallamount_lc')" label-width="110px">
            <el-input v-model.trim="subDetails.fbillallamountLc" disabled />
          </el-form-item>
        </el-form>
      </el-tab-pane>
    </el-tabs>
    <div style="margin-bottom: 5px;">
      <el-button size="mini" @click="newHang">{{ $t('btn.newHang') }}<!--新增行--></el-button>
      <el-button size="mini" @click="delHang">{{ $t('btn.delHang') }}<!--删除行--></el-button>
      <el-button size="mini" @click="batchFill">{{ $t('btn.batchFill') }}<!--批量填充--></el-button>
    </div>
    <jc-table
      :table-data="tableData"
      :table-header="tableHeader"
      :table-height="tableHeight"
      serial
      sortable
      @rowClick="rowClick"
      @cellClick="cellClick"
    >
      <el-table-column
        v-if="subDetails.fbillTypeId===1499"
        :label="$t('market.typenumber')"
        width="130"
        align="center"
      >
        <template slot-scope="scope">
          <el-input
            v-model.trim="scope.row.fyxmcode"
            size="mini"
            style="width: 100%"
          >
            <i
              slot="suffix"
              class="el-input__icon el-icon-search"
              @click="handleGetFyxm(scope.$index)"
            />
          </el-input>
        </template>
      </el-table-column>
      <el-table-column
        v-if="subDetails.fbillTypeId===1499"
        :label="$t('market.typename')"
        prop="fyxmname"
        align="center"
        width="120"
      >
        <template slot-scope="scope">
          {{ scope.row.fyxmname }}
        </template>
      </el-table-column>
      <el-table-column v-if="subDetails.fbillTypeId!==1499" :label="$t('market.fmodel')" prop="fmodel" align="center" />
      <!--    物料编码    -->
      <el-table-column v-if="subDetails.fbillTypeId!==1499" :label="$t('market.fmaterial')" prop="fmodel" align="center" width="150">
        <template slot-scope="scope">
          <el-input
            v-model.trim="scope.row.fnumber"
            size="mini"
            style="width: 100%"
            @input="getAtuo(scope.$index, scope.row.fnumber)"
          >
            <i
              slot="suffix"
              class="el-input__icon el-icon-search"
              @click="handleGetMateriel(scope.$index)"
            />
          </el-input>
          <div v-if="aotuTab && material === scope.$index" :class="material<7 ? 'tabPosit': 'tabPosit1'">
            <number-code :fnumber="fnumber" @material="materialData" />
          </div>
        </template>
      </el-table-column>
      <!-- 单位 -->
      <template v-slot:text4Slot="col">
        <span v-if="subDetails.fbillTypeId===1249">{{ col.scope.row.funitName }}</span>
        <el-input v-else v-model="col.scope.row.funitName" size="mini">
          <i
            slot="suffix"
            class="el-input__icon el-icon-search"
            @click="handleGetUnit(col.scope.$index)"
          />
        </el-input>
      </template>
      <!--    数量  -->
      <template v-slot:btnSlot="col">
        <el-input-number v-model.number="col.scope.row.fcalQty" size="mini" @change="handelQty(col.scope.$index)" />
      </template>
      <!--    含税单价  -->
      <template v-slot:tagSlot="col">
        <el-input-number
          v-model.number="col.scope.row.ftaxprice"
          :precision="4"
          :min="0"
          size="mini"
          @change="handelQty(col.scope.$index)"
        />
      </template>
      <!--    税率  -->
      <template v-slot:billSlot="col">
        <el-input-number
          v-model.number="col.scope.row.ftaxrate"
          :min="0"
          :max="100"
          size="mini"
          @change="handelQty(col.scope.$index)"
        />
      </template>
      <!--  折扣率  -->
      <template v-slot:orderSlot="col">
        <el-input-number
          v-model.number="col.scope.row.fdiscountrate"
          :min="0"
          :max="100"
          size="mini"
          @change="handelQty(col.scope.$index)"
        />
      </template>
      <!--    备注  -->
      <template v-slot:btnStates="col">
        <el-input v-model.number="col.scope.row.fremark" size="mini" />
      </template>
      <!--    费用项目  -->
      <template v-slot:text2Slot="col">
        <el-select
          v-model="col.scope.row.fexpenseitemid"
          size="mini"
        >
          <el-option
            v-for="item in paymentDa"
            :key="item.fid"
            :label="item.fname"
            :value="item.fid"
          />
        </el-select>
      </template>
      <!--    费用承担部门  -->
      <template v-slot:text3Slot="col">
        <el-select
          v-model="col.scope.row.fdepartmentid"
          size="mini"
        >
          <el-option
            v-for="item in paymentDa1"
            :key="item.fid"
            :label="item.fname"
            :value="item.fid"
          />
        </el-select>
      </template>
    </jc-table>
    <!--币别-->
    <currency v-if="openCurrency" @currency="currencySelectRow" />
    <!--    物料弹窗-->
    <material v-if="openMaterialDialog" @material="materialData" />
    <!--供应商-->
    <supplier v-if="openSupplier" @supplier="supplierSelectRow" />
    <!--采购员-->
    <market v-if="purchaseVisiblit" :staff-type="staffType" @market="purchaseData" />
    <!--收款条件列表-->
    <gathering v-if="gatheringVisiblit" @gathering="gatheringData" />
    <!--费用项目列表-->
    <fyxmList v-if="fyxmListVisiblit" @fyxm="fyxmData" />
    <baseUnit v-if="isBaseUnit" :msg="false" @unit="selBaseunit" />
  </div>
</template>

<script>
import {
  createPayableBill
} from '@/api/financial/cashier'
import { queryFxxchange, queryOrgDetail, queryRate, queryViewItem } from '@/api/marketManage/marketOrder'
import autocomplete from '@/views/market/marketManage/createMarkerOrder/components/autocomplete'
import bility from '@/mixin/Operability'

export default {
  name: 'CreatePayable',
  components: {
    baseUnit: () => import('@/views/basic/createMateriel2/components/baseUnit'),
    fyxmList: () => import('@/views/financial/cashier/payable/createPayable/component/fyxmList'),
    currency: () => import('@/views/market/marketManage/createMarkerOrder/components/currency'),
    material: () => import('@/views/market/marketManage/createMarkerOrder/components/material'),
    supplier: () => import('@/views/purchasing/purchase/treePurchasePrice/component/supplier'),
    market: () => import('@/views/market/marketManage/createMarkerOrder/components/market'),
    gathering: () => import('@/views/market/marketManage/createMarkerOrder/components/gathering'),
    numberCode: () => import('@/components/NumberCode')
  },
  mixins: [autocomplete, bility],
  data() {
    return {
      paymentDa: [],
      paymentDa1: [],
      aotuTab: false,
      fnumber: '',
      material: 0,
      isBaseUnit: false, // 单位弹窗
      fyxmListVisiblit: false, // 费用项目弹窗
      openSupplier: false, // 供应商弹窗
      openCurrency: false, // 币别、价目表、价格类型
      openMaterialDialog: false, // 物料弹窗
      purchaseVisiblit: false, // 2-采购员(1-销售员)
      staffType: 2, // 采购员
      gatheringVisiblit: false, // 收款条件
      subDetails: {
        fdocumentstatus: 'A',
        fbillTypeId: 1249,
        fdate: new Date(),
        fenddate: '',
        fsupplierId: '',
        fsettlecurrId: '',
        fpurchaserId: '',
        fpayconditionId: '',
        fcurrencyName: '',
        flocalCurr: '',
        fexchangerate: '',
        fexchangetype: '',
        fexchangetypeId: '',
        fbillamount: 0,
        fbillamountLc: 0,
        fbilltaxamount: 0,
        fbilltaxamountLc: 0,
        fbillallamount: 0,
        fbillallamountLc: 0
      },
      activeName: 'first',
      billtypes: [], // 单据类型
      indexSelf: 0,
      // 表头
      tableData: [{
        fmodel: '', fnumber: '', fname: '', funitName: '', fprice: 0, fcalQty: 0,
        ftaxprice: 0, ftaxrate: 0, fremark: '', famount: 0, ftaxamount: 0, fallamount: 0,
        fdiscountrate: 0, fdiscount: 0, fyxmcode: '', fyxmname: ''
      }], // 应付单数据
      tableHeight: '70vh',
      tableHeader: [
        // { label: this.$t('market.fmodel'), prop: 'fmodel' },
        // { label: this.$t('market.fmaterial'), type: 'state', prop: 'fnumber', width: '150' },
        { label: this.$t('shop.fname2'), prop: 'fname' },
        { label: this.$t('market.fdescripTion'), prop: 'fdescripTion', width: '200' },
        { label: this.$t('market.funit'), prop: 'funitName', width: '80' }, // type: 'text4',
        { label: this.$t('market.fprice'), prop: 'fprice', width: '80' },
        { label: this.$t('market.chargeQty'), type: 'btn', prop: 'fcalQty', width: '80' },
        { label: this.$t('market.ftaxPrice'), type: 'tag', prop: 'ftaxprice', width: '80' },
        { label: this.$t('market.ftaxRate'), type: 'bill', prop: 'ftaxrate', width: '80' },
        { label: this.$t('market.note'), type: 'states', prop: 'fremark' },
        { label: this.$t('market.notrate'), prop: 'famount', width: '80' },
        { label: this.$t('market.billtaxamount'), prop: 'ftaxamount', width: '80' },
        { label: this.$t('market.billallamount'), prop: 'fallamount', width: '80' },
        { label: this.$t('market.fdiscountRate'), type: 'order', prop: 'fdiscountrate', width: '80' },
        { label: this.$t('market.discount'), prop: 'fdiscount', width: '80' },
        { label: this.$t('market.expenseite'), type: 'text2', prop: 'fexpenseitemname', width: '120' },
        { label: this.$t('market.department'), type: 'text3', prop: 'fdepartmentname', width: '120' }
      ]
    }
  },
  created() {
    this.queryTBasBilltype()
    this.queryProval()
    this.queryTBasBilltype2()
    this.queryTBasBilltype3()
    this.tableHeight = window.innerWidth > 1440 ? 'calc(100vh - 230px)' : '73vh'
  },
  methods: {
    // 查询费用项目
    async queryTBasBilltype2() {
      const { data: RES } = await queryViewItem({ viewName: 'SX_V_EXPENSEITEM' })
      this.paymentDa = RES.list
    },
    // 查询费用部门
    async queryTBasBilltype3() {
      const { data: RES } = await queryViewItem({ viewName: 'SX_V_WORKSHOP' })
      this.paymentDa1 = RES.list
    },
    // 监听单据类型
    queryProval() {
      const DATA = {
        fid: this.subDetails.fbillTypeId || 0,
        viewName: 'SX_PAYABLEBILLTYPE'
      }
      queryFxxchange(DATA).then(res => {
        if (res.code === 0) {
          this.subDetails = {
            ...this.subDetails,
            orgSet: res.data.fsettleorgid,
            orgCol: res.data.fsettleorgid,
            orgSal: res.data.fsaleorgid,
            fcurrencyName: res.data.fsettleCurr, // 币别
            fsettlecurrId: res.data.fsettleCurrId, // 币别id
            fexchangetype: res.data.fexchangeType, // 汇率类型
            fexchangetypeId: res.data.fexchangeTypeId, // 汇率类型id
            fexchangerate: res.data.fexchangeRate, // 汇率
            ...res.data
          }
        }
      })
    },
    // 监听组织
    saleHeadel(forgids) {
      this.subDetails.orgCol = forgids
      this.subDetails.orgSal = forgids
      queryOrgDetail({ forgids }).then(res => {
        if (res.code === 0) {
          this.subDetails = {
            ...this.subDetails,
            orgSet: res.data.fsettleorgid,
            orgCol: res.data.fsettleorgid,
            orgSal: res.data.fsaleorgid,
            fcurrencyName: res.data.fsettleCurr, // 币别
            fsettlecurrId: res.data.fsettleCurrId, // 币别id
            fexchangetype: res.data.fexchangeType, // 汇率类型
            fexchangetypeId: res.data.fexchangeTypeId, // 汇率类型id
            fexchangerate: res.data.fexchangeRate, // 汇率
            ...res.data
          }
        }
      })
    },
    // 保存
    newlyAdjustment() {
      const DATA = {
        ...this.subDetails,
        details: this.tableData
      }
      createPayableBill(DATA).then(res => {
        if (res.code === 0) {
          // 关闭当前页面
          this.$store.dispatch('tagsView/guanbi', this.$route)
          this.$router.push({ path: `/payableDetail/${res.data.fid}` })
          this.$message({ showClose: true, message: res.message, type: 'success' })
        } else {
          this.$confirm(res.message, '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'error'
          })
        }
      })
    },
    // 输入物料编码
    getAtuo(index, fnumber) {
      this.material = index
      this.aotuTab = true
      var vm = this
      clearTimeout(vm.timer) // 清除未执行的代码，重置回初始化状态
      vm.timer = setTimeout(() => {
        this.fnumber = fnumber
      }, 600)
    },

    // 查询汇率
    async querySalerRate() {
      const DATA = {
        tocurrId: this.subDetails.flocalCurrId,
        fromcurrId: this.subDetails.fsettlecurrId,
        queryDate: this.subDetails.fdate
      }
      const { data: RES, code, message } = await queryRate(DATA)
      if (code === 0) {
        this.subDetails.fexchangerate = RES.exchangeRate
        this.subDetails.fexchangetype = RES.exchangeTypeName
        this.subDetails.fexchangetypeId = RES.exchangeTypeId
      } else {
        this.$confirm(message, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'error'
        })
      }
    },
    // 查询单据类型
    async queryTBasBilltype() {
      const { data: RES } = await queryViewItem({ viewName: 'SX_PAYABLEBILLTYPE' })
      this.billtypes = RES.list
    },
    // 监听数量
    handelQty(index) {
      const item = this.tableData[index]
      item.fprice = (item.ftaxprice / (1 + (item.ftaxrate / 100))).toFixed(2)
      item.famount = (item.fprice * item.fcalQty * (1 - (item.fdiscountrate / 100))).toFixed(2)
      item.fallamount = (item.ftaxprice * item.fcalQty * (1 - (item.fdiscountrate / 100))).toFixed(2)
      item.ftaxamount = (item.fallamount - item.famount).toFixed(2)
      item.fdiscount = (item.ftaxprice * item.fcalQty * (item.fdiscountrate / 100)).toFixed(2)
      this.subDetails.fbillamount = 0
      this.subDetails.fbilltaxamount = 0
      this.subDetails.fbillallamount = 0
      this.tableData.forEach(res => {
        this.subDetails.fbillamount += res.famount * 1
        this.subDetails.fbilltaxamount += res.ftaxamount * 1
        this.subDetails.fbillallamount += res.fallamount * 1
      })
      const fexchangerate = this.subDetails.fexchangerate
      this.subDetails.fbillamountLc = (this.subDetails.fbillamount * fexchangerate).toFixed(2)
      this.subDetails.fbilltaxamountLc = (this.subDetails.fbilltaxamount * fexchangerate).toFixed(2)
      this.subDetails.fbillallamountLc = (this.subDetails.fbillallamount * fexchangerate).toFixed(2)
    },
    // 单位
    handleGetUnit(index) {
      this.material = index
      this.isBaseUnit = true
    },
    // 单位
    selBaseunit(iten) {
      if (iten.funitid) {
        const items = this.tableData[this.material]
        items.funitId = iten.funitid
        items.funitName = iten.fname
      }
      this.isBaseUnit = false
    },
    // 打开费用项目编码
    handleGetFyxm(index) {
      this.material = index
      this.fyxmListVisiblit = true
    }, // 费用项目编码选中
    fyxmData(iten) {
      if (iten?.fbillno) {
        const items = this.tableData[this.material]
        items.fyxmcode = iten.fbillno
        items.fyxmname = iten.fname
      }
      this.fyxmListVisiblit = false
    },
    // 打开物料编码
    handleGetMateriel(index) {
      this.material = index
      this.openMaterialDialog = true
    },
    // 物料选中
    materialData(item) {
      if (item.fmaterialId) {
        const items = this.tableData[this.material]
        items.fmaterialId = item.fmaterialId
        items.fnumber = item.fnumber
        items.fname = item.fname
        items.fdescripTion = item.fdescripTion
        items.funitId = item.fsaleUnitId
        items.funitName = item.fsaleUnit
        items.fmodel = item.fmodel
        this.aotuTab = false
      }
      this.openMaterialDialog = false
    },
    // 供应商选中
    supplierSelectRow(item) {
      const { fsupplierId, fname } = item
      if (fsupplierId) {
        this.subDetails.fsupplierId = fsupplierId
        this.subDetails.fsupplierName = fname
      }
      this.openSupplier = false
    },
    // 币别选中
    currencySelectRow(item) {
      if (item.fsettleCurrId || item.fcurrencyId) {
        this.subDetails.fsettlecurrId = item.fsettleCurrId || item.fcurrencyId
        this.subDetails.fcurrencyName = item.fsettleCurrIdName || item.fname
        this.querySalerRate()
      }
      this.openCurrency = false
    },
    // 获取采购员
    purchaseData(ev) {
      if (ev.fuserId) {
        this.subDetails.fpurchaser = ev.fuserName
        this.subDetails.fpurchaserId = ev.fuserId
      }
      this.purchaseVisiblit = false
    },
    // 收款条件列表
    gatheringData(item) {
      if (item.fvalue) {
        this.subDetails.fpayconditionName = item.fname
        this.subDetails.fpayconditionId = item.fid
      }
      this.gatheringVisiblit = false
    },
    // 单击行
    rowClick(row) {
      this.indexSelf = row.index
    },
    // 新增行
    newHang() {
      this.tableData.push({
        fmodel: '', fnumber: '', fname: '', funitName: '', fprice: 0, fcalQty: 0,
        ftaxprice: 0, ftaxrate: 0, fremark: '', famount: 0, ftaxamount: 0, fallamount: 0,
        fdiscountrate: 0, fdiscount: 0, fyxmcode: '', fyxmname: ''
      })
    },
    // 删除行
    delHang() {
      this.tableData.splice(this.indexSelf, 1)
    },
    // 点击单元格
    cellClick(row, column) {
      this.property = column.property
      this.subscript = row.index
    },
    // 批量填充
    batchFill() {
      const item = this.tableData[this.subscript][this.property]
      this.tableData.map((res, index) => {
        if (index >= this.subscript) {
          res[this.property] = item
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.tabPosit {
  padding: 5px;
  box-shadow: 0 0 2px #aaa;
  position: absolute;
  top: 3.5vh;
  left: 0;
  background-color: rgba(255, 255, 255, 1);
  z-index: 99999!important;
}
.tabPosit1 {
  padding: 5px;
  box-shadow: 0 0 2px #aaa;
  position: absolute;
  top: -25.69vh;
  left:0;
  background-color: rgba(255, 255, 255, 1);
  z-index: 9999;
}
.createPay {
  @include listBom;
  .header{
    margin-top: 10px;
    .header-name{
      span {
        width: 100px;
        margin-right: 10px;
        text-align: right;
      }
    }
  }
  .el-input::v-deep .el-input__inner {
    height: 30px;
    line-height: 30px;
  }
  .el-form {
    display: flex;
    flex-wrap: wrap;

    .el-form-item {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      height: 35px;
      width: 268px;
      margin-bottom: 2px;
      //&::v-deep .el-input--mini .el-input__inner{
      //  height: 22px;
      //}
      .btnType {
        margin-right: 20px;
      }

      .el-date-editor.el-input {
        width: 100% !important;
      }

      .el-select {
        width: 100%;
      }
    }
  }
}
</style>
